import { Body, Controller, HttpCode, Post } from '@nestjs/common'
import { SigninUserDto } from './dto/signin-user.dto'
import { AuthService } from './auth.service'

@Controller('auth')
export class AuthController {
  constructor(private authService: AuthService) {}
  @Post('/signin')
  // @HttpCode(200)
  async signin(@Body() dto: SigninUserDto) {
    const { username, password } = dto
    return this.authService.signin(username, password)
  }
}
